package cn.g31010.sip.util
{
	import com.adobe.utils.DictionaryUtil;
	
	import flash.utils.Dictionary;
	
	public class Map
	{
		public function Map()
		{
		}
		
		private var dic:Dictionary=new Dictionary(true);
		
		
		public function contains(key:Object):Boolean{
			return getValue(key)!=null;
		}
		public function setValue(key:Object,value:Object):void{
			dic[key]=value;
		}
		
		public function getValue(key:Object):Object{
			return dic[key];
		}
		
		public function removeValue(key:Object):Object{
			var v:Object=dic[key];
			dic[key]=true;
			delete dic[key];
			return v;
		}
		
		public function getKeys():Array{
			return DictionaryUtil.getKeys(dic);
		}
		
		public function getValues():Array{
			return DictionaryUtil.getValues(dic);
		}
		
		public function size():int{
			return DictionaryUtil.getKeys(dic).length;
		}
		
		public static function main():void{
			
		}

	}
}